//
//  ExpositionTableViewCell.m
//  110
//
//  Created by 沈鑫 on 16/4/11.
//  Copyright © 2016年 乔砥. All rights reserved.
//

#import "ExpositionTableViewCell.h"

@implementation ExpositionTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 5, 150, 20)];
        _label.text = @"【药品名称】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _namecn = [[UILabel alloc]initWithFrame:CGRectMake(20, 30, KWIDTH - 40, 20)];
        _namecn.textColor = [UIColor lightGrayColor];
        [self.contentView addSubview:_namecn];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 70, 150, 20)];
        _label.text = @"【成份】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _composition = [[UILabel alloc]initWithFrame:CGRectMake(20, 95, KWIDTH - 40, 60)];
        _composition.textColor = [UIColor lightGrayColor];
        _composition.font = [UIFont systemFontOfSize:12];;
        _composition.numberOfLines = 0;
        [self.contentView addSubview:_composition];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 175, 150, 20)];
        _label.text = @"【性状】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _drugattribute = [[UILabel alloc]initWithFrame:CGRectMake(20, 200, KWIDTH - 40, 20)];
        _drugattribute.textColor = [UIColor lightGrayColor];
        _drugattribute.font = [UIFont systemFontOfSize:12];
        _drugattribute.numberOfLines = 0;
        [self.contentView addSubview:_drugattribute];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 240, 150, 20)];
        _label.text = @"【适应症】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _gongneng = [[UILabel alloc]initWithFrame:CGRectMake(20, 265, KWIDTH - 40, 60)];
        _gongneng.textColor = [UIColor lightGrayColor];
        _gongneng.font = [UIFont systemFontOfSize:12];
        _gongneng.numberOfLines = 0;
        [self.contentView addSubview:_gongneng];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 345, 150, 20)];
        _label.text = @"【规格】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _unit = [[UILabel alloc]initWithFrame:CGRectMake(20, 370, KWIDTH - 40, 20)];
        _unit.textColor = [UIColor lightGrayColor];
        _unit.font = [UIFont systemFontOfSize:12];
        _unit.numberOfLines = 0;
        [self.contentView addSubview:_unit];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 410, 150, 20)];
        _label.text = @"【用法用量】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _usage = [[UILabel alloc]initWithFrame:CGRectMake(20, 435, KWIDTH - 40, 20)];
        _usage.textColor = [UIColor lightGrayColor];
        _usage.font = [UIFont systemFontOfSize:12];
        _usage.numberOfLines = 0;
        [self.contentView addSubview:_usage];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 475, 150, 20)];
        _label.text = @"【不良反应】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _adr = [[UILabel alloc]initWithFrame:CGRectMake(20, 500, KWIDTH - 40, 40)];
        _adr.textColor = [UIColor lightGrayColor];
        _adr.font = [UIFont systemFontOfSize:12];
        _adr.numberOfLines = 0;
        [self.contentView addSubview:_adr];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 560, 150, 20)];
        _label.text = @"【注意事项】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _note = [[UILabel alloc]initWithFrame:CGRectMake(20, 585, KWIDTH - 40, 120)];
        _note.textColor = [UIColor lightGrayColor];
        _note.font = [UIFont systemFontOfSize:12];
        _note.numberOfLines = 0;
        [self.contentView addSubview:_note];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 725, 150, 20)];
        _label.text = @"【药物相互作用】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _interaction = [[UILabel alloc]initWithFrame:CGRectMake(20, 750, KWIDTH - 40, 80)];
        _interaction.textColor = [UIColor lightGrayColor];
        _interaction.font = [UIFont systemFontOfSize:12];
        _interaction.numberOfLines = 0;
        [self.contentView addSubview:_interaction];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 850, 150, 20)];
        _label.text = @"【药理作用】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _pharmacology = [[UILabel alloc]initWithFrame:CGRectMake(20, 875, KWIDTH - 40, 120)];
        _pharmacology.textColor = [UIColor lightGrayColor];
        _pharmacology.font = [UIFont systemFontOfSize:12];
        _pharmacology.numberOfLines = 0;
        [self.contentView addSubview:_pharmacology];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1015, 150, 20)];
        _label.text = @"【储藏】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _storage = [[UILabel alloc]initWithFrame:CGRectMake(20, 1040, KWIDTH - 40, 20)];
        _storage.textColor = [UIColor lightGrayColor];
        _storage.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_storage];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1080, 150, 20)];
        _label.text = @"【有效期】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _shelflife = [[UILabel alloc]initWithFrame:CGRectMake(20, 1105, KWIDTH - 40, 20)];
        _shelflife.textColor = [UIColor lightGrayColor];
        _shelflife.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_shelflife];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1145, 150, 20)];
        _label.text = @"【批准文号】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _codename = [[UILabel alloc]initWithFrame:CGRectMake(20, 1170, KWIDTH - 40, 20)];
        _codename.textColor = [UIColor lightGrayColor];
        _codename.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_codename];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1210, 150, 20)];
        _label.text = @"【执行标准】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _standard = [[UILabel alloc]initWithFrame:CGRectMake(20, 1235, KWIDTH - 40, 20)];
        _standard.textColor = [UIColor lightGrayColor];
        _standard.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_standard];
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1275, 150, 20)];
        _label.text = @"【说明书修订日期】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _specificationdate = [[UILabel alloc]initWithFrame:CGRectMake(20, 1300, KWIDTH - 40, 20)];
        _specificationdate.textColor = [UIColor lightGrayColor];
        _specificationdate.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_specificationdate];
        
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 1340, 150, 20)];
        _label.text = @"【生产企业】";
        _label.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_label];
        _refdrugcompanyname = [[UILabel alloc]initWithFrame:CGRectMake(20, 1365, KWIDTH - 40, 20)];
        _refdrugcompanyname.textColor = [UIColor lightGrayColor];
        _refdrugcompanyname.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_refdrugcompanyname];
        
   
    }
    return self;
}

- (void)getModel:(ExpositionModel *)model
{
    _namecn.text = model.namecn;
    _composition.text = model.composition;
    _drugattribute.text = model.drugattribute;
    _gongneng.text = model.gongneng;
    _unit.text = model.unit;
    _usage.text = model.usage;
    _adr.text = model.adr;
    _note.text = model.note;
    _interaction.text = model.interaction;
    _pharmacology.text = model.pharmacology;
    _storage.text = model.storage;
    _shelflife.text = model.shelflife;
    _codename.text = model.codename;
    _standard.text = model.standard;
    _specificationdate.text = model.specificationdate;
    _refdrugcompanyname.text = model.refdrugcompanyname;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
